import request from '../utils/request';

//查询通讯录列表
export async function getFriendList(data) {
    return request({
        url: '/friend/list/' + data.cid,
        method: 'get'
    });
}

//删除好友
export async function delFriend(data) {
    return request({
        url: '/friend/delete',
        method: 'post',
        data:data
    });
}

//添加星标好友
export async function addStarFriend(data) {
    return request({
        url: '/friend/add/star',
        method: 'post',
        data:data
    });
}

//取消星标好友
export async function cancelStarFriend(data) {
    return request({
        url: '/friend/cancel/star',
        method: 'post',
        data:data
    });
}

//查询聊天列表
export async function getChatList(data) {
    return request({
        url: '/friend/list/chat/' + data.cid,
        method: 'get'
    });
}

//新增聊天关系
export async function addChat(data) {
    return request({
        url: '/friend/list/chat/' + data.cid,
        method: 'get'
    });
}


